str1 = "原神"
byte1 = str1.encode("GBK")
byte2 = str1.encode("utf-8")
print("源字符串：", str1)
print("转化后字符串：", byte1)
print("转化后字符串：", byte2)
newstr1 = byte2.decode("utf-8")
print("解码后：", newstr1)
newstr2 = byte1.decode("GBK")
print("解码后：", newstr2)